<?php


namespace App\Models;


class Tag extends Model
{
    protected $table = 'tags';



    // ============= relationships ==========
    public function audio()
    {
        return $this->belongsTo(Attachment::class, 'audio');
    }

    public function cover()
    {
        return $this->belongsTo(Attachment::class, 'cover');
    }

    public function knowledge()
    {
        return $this->hasMany(Knowledge::class);
    }

    // ============= scope ==========



    // ============= field ==========
    public function setCnName($name)
    {
        $this->cn_name = $name;
    }

    public function getCnName()
    {
        return $this->cn_name;
    }

    public function setEnName($name)
    {
        $this->en_name = $name;
    }

    public function getEnName()
    {
        return $this->en_name;
    }

    public function setCover($imageId)
    {
        $this->cover = $imageId;
    }

    public function setAudio($audioId)
    {
        $this->audio = $audioId;
    }






    public function setDescription($description)
    {
        $this->description = $description;
    }

    public function getDescription()
    {
        return $this->description;
    }


}